/*
@Time : 2020-01-11 11:21
@Author : wj
@File : code
@Software: GoLand
*/

package errno

var (
	// Common errors
	OK                  = &Errno{Code: 0, Message: "OK."}
	InternalServerError = &Errno{Code: 10001, Message: "内部服务器错误."}
	ErrBind             = &Errno{Code: 10002, Message: "将请求正文绑定到结构时出错."}

	// user errors
	ErrUserNotFound = &Errno{Code: 20102, Message: "找不到用户."}
	ErrValidation   = &Errno{Code: 20001, Message: "验证失败."}
	ErrDatabase     = &Errno{Code: 20002, Message: "数据库错误."}
	ErrToken        = &Errno{Code: 20003, Message: "签署JSON网络令牌时发生错误."}

	// user errors
	ErrEncrypt           = &Errno{Code: 20101, Message: "加密用户密码时发生错误."}
	ErrTokenInvalid      = &Errno{Code: 20103, Message: "token无效."}
	ErrPasswordIncorrect = &Errno{Code: 20104, Message: "密码错误."}
)
